<script lang="ts" setup>

interface Props {
    show?: boolean;
    closeable?: boolean;
    closeicon?: string;
    position?: string;
    style?: object;
    closeIconPosition?: string;
    round?: boolean;
    overlay?: boolean;
    overlayStyle?: object;
    closeOnPopstate?: boolean;
    lockScroll?: boolean;
    safeAreaInsetTop?: boolean;
    safeAreaInsetBottom?: boolean;
}
withDefaults(defineProps<Props>(), {
    show: true,
    closeable: false,
    closeicon: "close",
    position: "bottom",
    style: () => ({
        height: "30%"
    }),
    closeIconPosition: "top-left",
    round: false,
    overlay: true,
    overlayStyle: () => ({
        background: "rgb(0 0 0 / 45%)"
    }),
    closeOnPopstate: true,
    lockScroll: true,
    safeAreaInsetTop: true,
    safeAreaInsetBottom: true,
});
</script>
<template>
    <van-popup :show="show" :closeable="closeable" :position="position" :style="style" :close-icon="closeicon"
        :close-icon-position="closeIconPosition" :round="round" :overlay="overlay" :close-on-popstate="closeOnPopstate"
        :lock-scroll="lockScroll" :safe-area-inset-top="safeAreaInsetTop" :safe-area-inset-bottom="safeAreaInsetBottom"
        :overlay-style="overlayStyle">
        <slot name="default"></slot>
    </van-popup>
</template>
<style lang="scss" scoped></style>